import request from "@/utils/request";

/*
    search请求模块
    /app/v1_0/suggestion
 */
export const reqSearchSuggestionLists = q =>{
    return request({
        method: "GET",
        url: "/v1_0/suggestion",
        params: {
            q
        }
    })
}


/*
    search请求结果
    /app/v1_0/search
 */
    export const reqSearchResult = params =>{
        return request({
            method: "GET",
            url: "v1_0/search",
            params
        })
    }

    /*
    search请求用户的历史记录
    /app/v1_0/search
 */
    export const reqSearchHistories = () =>{
        return request({
            method: "GET",
            url: "v1_0/search/histories"
        })
    }


/*
    search删除用户的全部历史记录
    /app/v1_0/search/histories
 */
export const reqDelAllHistories = () =>{
    return request({
        method: "DELETE",
        url: "/app/v1_0/search/histories"
    })
}

    